<template>
	<view class="box">
		<image :src="user.avator"></image>
		<view class="username">{{user.name}}</view>
	</view>
</template>

<script setup>
import { computed } from 'vue';
	const myname = defineProps({
		user:{
			type:Object,
			default(){
				return {
					username:"新用户",
					avator:"../../static/logo.png"
				}
			}
		}
	})
</script>

<style lang="scss" scoped>
.box{
	width: 100vw;
	height: 200px;
	display: flex;
	flex-direction: column;
	background-color: #ccc;
	align-items: center;
	justify-content: center;
	image{
		border-radius: 50%;
		width: 100px;
		height: 100px;
	}
	.username{
		padding: 10px;
		font-size: 20px;
	}
}
</style>